import Vue from 'vue'
import Element from 'element-ui'
import { Notification } from 'element-ui'
import locale from 'element-ui/lib/locale/lang/zh-CN'
import '../assets/css/theme/index.css'


Vue.use(Element, { locale, size: 'small', zIndex: 3000 })

/**
 * 消息提示
 * @param type    消息类型
 * @param title   消息标题
 * @param message 消息内容
 */
Vue.prototype.notify = (type, title, message) => {
  Notification({
    type,
    title,
    message,
    offset: 100,
    duration: 2000
  })
}
